import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from "@angular/forms";
import { OnetooneRoutingModule } from './onetoone-routing.module';
import { OnetooneEditComponent } from './edit/edit.component';
import { OnetooneStepbarComponent } from './stepbar/stepbar.component';
import { OnetooneDetailComponent } from './detail/detail.component';
import { OnetooneCheckComponent } from './check/check.component';
import { EnclosureComponent } from './enclosure/enclosure.component';
import { FileUploadModule } from 'ng2-file-upload';
import { CustomFormsModule } from 'ng2-validation';
import { AppPaginationModule } from "../../widgets/pagination/pagination.module";

import { FlatpickrModule, FLATPICKR } from '../../../assets/angularx-flatpickr';
import * as flatpickr from 'flatpickr';
import { OnetooneCheckModalComponent } from './modal/check/check.component';
import { CustomerComponent } from './customer/customer.component';
export function flatpickrFactory() {
  return flatpickr;
}
@NgModule({
  imports: [
    CommonModule,
    OnetooneRoutingModule,
    FormsModule,
    FileUploadModule,
    CustomFormsModule,
    AppPaginationModule,
    FlatpickrModule.forRoot({
      provide: FLATPICKR,
      useFactory: flatpickrFactory
    })
  ],
  entryComponents: [OnetooneCheckModalComponent],//动态加载组件
  declarations: [OnetooneEditComponent, OnetooneStepbarComponent, OnetooneDetailComponent, OnetooneCheckComponent, EnclosureComponent, OnetooneCheckModalComponent, CustomerComponent]
})
export class OnetooneModule { }
